<template>
  <div id="" class="headerStyle">
    <el-page-header @back="goBack">
      <template slot="content">
        <div class="headerContent">{{ headerContent }}</div>
      </template>
    </el-page-header>
    <div class="headerButton">
      <slot></slot>
      <el-button @click.native.prevent="item.method" :type="item.type" v-for="(item, index) in buttons" :key="index" size="small">{{
        item.label
      }}</el-button>
    </div>
  </div>
</template>
<script>
export default {
  name: '',
  props: {
    buttons: {
      type: Array,
      default: () => []
    },
    headerContent: {
      type: String,
      default: ''
    },
  },
  methods: {
    goBack() {
      this.$emit('goBack');
    }
  }
};
</script>
<style lang="scss" scoped>
.headerStyle {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
}
</style>
